﻿<%@ Page Language="C#" MasterPageFile="~/MainPage.master" AutoEventWireup="true"
    CodeFile="Customers.aspx.cs" Inherits="Customers" Title="Customers" %>

<asp:Content ID="webCustomersTitle" ContentPlaceHolderID="cphTitle" runat="server">
    <div class="row">
        <div class="col-lg-12">
            <h1 class="page-header">
                Customers
            </h1>
            <ol class="breadcrumb">
                <li><i class="fa fa-home"></i><a href="Home.aspx">Home</a> </li>
                <li class="active"><i class="fa fa-file"></i>Customers </li>
            </ol>
        </div>
    </div>
</asp:Content>
<asp:Content ID="webCustomers" ContentPlaceHolderID="cphMainPage" runat="Server">
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <link href="css/CSSGridView1.css" rel="stylesheet" type="text/css" />
        <title>Customers</title>
    </head>
    <body>
        <form id="form1">
        <div>
            <table border="0" cellpadding="2" cellspacing="2" width="100%">
                <tr style="height: 30px">
                    <td width="13%">
                        Customer ID:
                    </td>
                    <td width="30%">
                        <asp:TextBox ID="txtcustid" runat="server" Enabled="False"></asp:TextBox>
                    </td>
                    <td width="10%">
                        City:
                    </td>
                    <td>
                        <asp:TextBox ID="txtCity" runat="server" MaxLength="15"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvCity" runat="server" ErrorMessage="Enter City"
                            ControlToValidate="txtCity"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr style="height: 30px">
                    <td>
                        Company Name:
                    </td>
                    <td>
                        <asp:TextBox ID="txtCompanyName" runat="server" MaxLength="40"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvCompanyName" runat="server" ErrorMessage="Enter Company Name"
                            ControlToValidate="txtCompanyName"></asp:RequiredFieldValidator>
                    </td>
                    <td>
                        Region:
                    </td>
                    <td>
                        <asp:TextBox ID="txtRegion" runat="server" MaxLength="15"></asp:TextBox>
                    </td>
                </tr>
                <tr style="height: 30px">
                    <td>
                        Contact Name:
                    </td>
                    <td>
                        <asp:TextBox ID="txtContactName" runat="server" MaxLength="30"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvContactName" runat="server" ErrorMessage="Enter Contact Name"
                            ControlToValidate="txtContactName"></asp:RequiredFieldValidator>
                    </td>
                    <td>
                        PostalCode:
                    </td>
                    <td>
                        <asp:TextBox ID="txtPostalcode" runat="server" MaxLength="10"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="revPostalCode" runat="server" ControlToValidate="txtPostalcode"
                            ErrorMessage="PostalCode Invalid (5 digits)" ValidationExpression="\d{5}"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr style="height: 30px">
                    <td>
                        Contact Title:
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlContactTitle" runat="server" Width="156px" Height="25px">
                            <asp:ListItem Selected="True">Owner</asp:ListItem>
                            <asp:ListItem>Owner/Marketing Assistant</asp:ListItem>
                            <asp:ListItem>Sales Agent</asp:ListItem>
                            <asp:ListItem>Sales Associate</asp:ListItem>
                            <asp:ListItem>Sales Manager</asp:ListItem>
                            <asp:ListItem>Sales Representative</asp:ListItem>
                            <asp:ListItem>Order Administrator</asp:ListItem>
                            <asp:ListItem>Marketing Manager</asp:ListItem>
                            <asp:ListItem>Marketing Assistant</asp:ListItem>
                            <asp:ListItem>Accounting Manager</asp:ListItem>
                            <asp:ListItem>Assistant Sales Agent</asp:ListItem>
                            <asp:ListItem>Assistant Sales Representative</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td>
                        Country:
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlCountry" runat="server" Width="156px" Height="25px">
                            <asp:ListItem>Argentina</asp:ListItem>
                            <asp:ListItem>Austria</asp:ListItem>
                            <asp:ListItem>Belgium</asp:ListItem>
                            <asp:ListItem>Brazil</asp:ListItem>
                            <asp:ListItem>Canada</asp:ListItem>
                            <asp:ListItem>Denmark</asp:ListItem>
                            <asp:ListItem>Finland</asp:ListItem>
                            <asp:ListItem>France</asp:ListItem>
                            <asp:ListItem>Germany</asp:ListItem>
                            <asp:ListItem>Ireland</asp:ListItem>
                            <asp:ListItem>Italy</asp:ListItem>
                            <asp:ListItem>Lao</asp:ListItem>
                            <asp:ListItem>Mexico</asp:ListItem>
                            <asp:ListItem>Norway</asp:ListItem>
                            <asp:ListItem>Poland</asp:ListItem>
                            <asp:ListItem>Portugal</asp:ListItem>
                            <asp:ListItem>Spain</asp:ListItem>
                            <asp:ListItem>Sweden</asp:ListItem>
                            <asp:ListItem>Switzerland</asp:ListItem>
                            <asp:ListItem>UK</asp:ListItem>
                            <asp:ListItem>USA</asp:ListItem>
                            <asp:ListItem>Venezuela</asp:ListItem>
                            <asp:ListItem>VietNam</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr style="height: 30px">
                    <td rowspan="2">
                        Address:
                    </td>
                    <td rowspan="2">
                        <asp:TextBox ID="txtAddress" runat="server" MaxLength="60" Height="60px" Width="156px"
                            TextMode="MultiLine"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvAddress" runat="server" ErrorMessage="Enter Address"
                            ControlToValidate="txtAddress"></asp:RequiredFieldValidator>
                    </td>
                    <td>
                        Phone:
                    </td>
                    <td>
                        <asp:TextBox ID="txtPhone" runat="server" MaxLength="24"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="revPhone" runat="server" ControlToValidate="txtPhone"
                            ErrorMessage="(999) 000-0000" ValidationExpression="((\(\d?\d?\d\) ?)|(\d{3}-))?\d{3}-\d{4}"
                            Display="Dynamic"></asp:RegularExpressionValidator>
                        <asp:RequiredFieldValidator ID="rfvPhone" runat="server" ErrorMessage="Enter Phone"
                            ControlToValidate="txtPhone" Display="Dynamic"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr style="height: 30px">
                    <td>
                        Fax:
                    </td>
                    <td>
                        <asp:TextBox ID="txtFax" runat="server" MaxLength="24"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="revFax" runat="server" ControlToValidate="txtFax"
                            ErrorMessage="(999) 000-0000" ValidationExpression="((\(\d?\d?\d\) ?)|(\d{3}-))?\d{3}-\d{4}"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr style="height: 50px">
                    <td>
                        <asp:Button ID="btnNew" runat="server" Text="New" Width="65px" OnClick="btnNew_Click"
                            CausesValidation="False" />
                        <asp:Button ID="btnAdd" runat="server" Text="Add" Width="65px" OnClick="btnAdd_Click" />
                    </td>
                    <td>
                        <asp:Button ID="btnUpdate" runat="server" Text="Update" Width="65px" OnClick="btnUpdate_Click"
                            Enabled="False" />
                        <asp:Button ID="btnDelete" runat="server" Text="Delete" Width="65px" OnClick="btnDelete_Click"
                            CausesValidation="False" Enabled="False" />
                    </td>
                </tr>
                <tr style="height: 30px">
                    <td rowspan="1">
                        <asp:Button ID="btnShowAll" runat="server" Text="Refresh" Width="100px" OnClick="btnShowAll_Click"
                            CausesValidation="False" />
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr style="height: 30px">
                    <td>
                        <asp:DropDownList ID="ddlSearch" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlSearch_SelectedIndexChanged"
                            Height="25px">
                            <asp:ListItem Selected="True">ID</asp:ListItem>
                            <asp:ListItem>Company Name</asp:ListItem>
                            <asp:ListItem>Company Title</asp:ListItem>
                            <asp:ListItem>Country</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td>
                        <asp:TextBox ID="txtSearch" runat="server"></asp:TextBox>
                        <asp:DropDownList ID="ddlSearchbyCountry" runat="server" Width="173px" Visible="False"
                            Height="25px">
                            <asp:ListItem>Argentina</asp:ListItem>
                            <asp:ListItem>Austria</asp:ListItem>
                            <asp:ListItem>Belgium</asp:ListItem>
                            <asp:ListItem>Brazil</asp:ListItem>
                            <asp:ListItem>Canada</asp:ListItem>
                            <asp:ListItem>Denmark</asp:ListItem>
                            <asp:ListItem>Finland</asp:ListItem>
                            <asp:ListItem>France</asp:ListItem>
                            <asp:ListItem>Germany</asp:ListItem>
                            <asp:ListItem>Ireland</asp:ListItem>
                            <asp:ListItem>Italy</asp:ListItem>
                            <asp:ListItem>Lao</asp:ListItem>
                            <asp:ListItem>Mexico</asp:ListItem>
                            <asp:ListItem>Norway</asp:ListItem>
                            <asp:ListItem>Poland</asp:ListItem>
                            <asp:ListItem>Portugal</asp:ListItem>
                            <asp:ListItem>Spain</asp:ListItem>
                            <asp:ListItem>Sweden</asp:ListItem>
                            <asp:ListItem>Switzerland</asp:ListItem>
                            <asp:ListItem>UK</asp:ListItem>
                            <asp:ListItem>USA</asp:ListItem>
                            <asp:ListItem>Venezuela</asp:ListItem>
                            <asp:ListItem>VietNam</asp:ListItem>
                        </asp:DropDownList>
                        <asp:DropDownList ID="ddlSearchbyContactTitle" runat="server" Width="173px" Visible="False"
                            Height="25px">
                            <asp:ListItem Selected="True">Owner</asp:ListItem>
                            <asp:ListItem>Owner/Marketing Assistant</asp:ListItem>
                            <asp:ListItem>Sales Agent</asp:ListItem>
                            <asp:ListItem>Sales Associate</asp:ListItem>
                            <asp:ListItem>Sales Manager</asp:ListItem>
                            <asp:ListItem>Sales Representative</asp:ListItem>
                            <asp:ListItem>Order Administrator</asp:ListItem>
                            <asp:ListItem>Marketing Manager</asp:ListItem>
                            <asp:ListItem>Marketing Assistant</asp:ListItem>
                            <asp:ListItem>Accounting Manager</asp:ListItem>
                            <asp:ListItem>Assistant Sales Agent</asp:ListItem>
                            <asp:ListItem>Assistant Sales Representative</asp:ListItem>
                        </asp:DropDownList>
                        <asp:Button ID="btnSearch" runat="server" Text="Search" Width="100px" OnClick="btnSearch_Click"
                            CausesValidation="False" />
                    </td>
                </tr>
            </table>
            <asp:GridView ID="gvCustomers" runat="server" OnPageIndexChanging="gvCustomers_PageIndexChanging"
                OnSelectedIndexChanged="gvCustomers_SelectedIndexChanged" CssClass="Grid" AlternatingRowStyle-CssClass="alt"
                PagerStyle-CssClass="pgr" AllowSorting="True" 
                onsorting="gvCustomers_Sorting">
                <PagerStyle CssClass="pgr"></PagerStyle>
                <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>
            </asp:GridView>
        </div>
        </form>
    </body>
    </html>
</asp:Content>
